<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='global-property-'>/**
</span> * @fileOverview 可选中的控件,父控件支持selection扩展
 * @ignore
 */


<span id='BUI-Component-UIBase-ListItemView'>/**
</span> * 列表项控件的视图层
 * @class BUI.Component.UIBase.ListItemView
 * @private
 */
function listItemView() {
  // body...
}

listItemView.ATTRS = {
<span id='BUI-Component-UIBase-ListItemView-property-selected'>  /**
</span>   * 是否选中
   * @type {Boolean}
   */
  selected: {

  }
};

listItemView.prototype = {
  _uiSetSelected: function(v) {
    var _self = this,
      cls = _self.getStatusCls(&#39;selected&#39;),
      el = _self.get(&#39;el&#39;);
    if (v) {
      el.addClass(cls);
    } else {
      el.removeClass(cls);
    }
  }
};
<span id='BUI-Component-UIBase-ListItem'>/**
</span> * 列表项的扩展
 * @class BUI.Component.UIBase.ListItem
 */
function listItem() {

}

listItem.ATTRS = {

<span id='BUI-Component-UIBase-ListItem-cfg-selectable'>  /**
</span>   * 是否可以被选中
   * @cfg {Boolean} [selectable=true]
   */
<span id='BUI-Component-UIBase-ListItem-property-selectable'>  /**
</span>   * 是否可以被选中
   * @type {Boolean}
   */
  selectable: {
    value: true
  },

<span id='BUI-Component-UIBase-ListItem-property-selected'>  /**
</span>   * 是否选中,只能通过设置父类的选中方法来实现选中
   * @type {Boolean}
   * @readOnly
   */
  selected: {
    view: true,
    sync: false,
    value: false
  }
};

listItem.prototype = {

};

listItem.View = listItemView;

module.exports = listItem;
</pre>
</body>
</html>
